<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      function getStudentInstance(sid, sname, age) {
        var stu = new Object()
        stu.sid = sid
        stu.sname = sname
        stu.age = age
        stu.study = function () {
          console.log('=============stu=======study')
        }
        return stu
      }

      var stu = getStudentInstance('S3', 'wang5', 20)
      console.log('学号:' + stu.sid)
      console.log('姓名:' + stu.sname)
      console.log('年龄:' + stu.age)
      stu.study()
    </script>
  </head>
  <body></body>
</html>
